---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_2986/3662454446.py in <module>
2 # in python
3 # for creating a responsive plot
----> 4 get_ipython().run_line_magic('matplotlib', 'widget')
5
6 # importing required libraries
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2349 kwargs['local_ns'] = self.get_local_scope(stack_depth)
2350 with self.builtin_trap:
-> 2351 result = fn(*args, **kwargs)
2352 return result
2353
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/decorator.py in fun(*args, **kw)
230 if not kwsyntax:
231 args, kw = fix(args, kw, sig)
--> 232 return caller(func, *(extras + args), **kw)
233 fun.__name__ = func.__name__
234 fun.__doc__ = func.__doc__
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/IPython/core/magics/pylab.py in matplotlib(self, line)
97 print("Available matplotlib backends: %s" % backends_list)
98 else:
---> 99 gui, backend = self.shell.enable_matplotlib(args.gui.lower() if isinstance(args.gui, str) else args.gui)
100 self._show_matplotlib_backend(args.gui, backend)
101
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
3531 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
3532
-> 3533 pt.activate_matplotlib(backend)
3534 configure_inline_support(self, backend)
3535
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/IPython/core/pylabtools.py in activate_matplotlib(backend)
357 from matplotlib import pyplot as plt
358
--> 359 plt.switch_backend(backend)
360
361 plt.show._needmain = False
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/matplotlib/pyplot.py in switch_backend(newbackend)
275 backend_name = cbook._backend_module_name(newbackend)
276
--> 277 class backend_mod(matplotlib.backend_bases._Backend):
278 locals().update(vars(importlib.import_module(backend_name)))
279
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/matplotlib/pyplot.py in backend_mod()
276
277 class backend_mod(matplotlib.backend_bases._Backend):
--> 278 locals().update(vars(importlib.import_module(backend_name)))
279
280 required_framework = _get_required_interactive_framework(backend_mod)
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/__init__.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'ipympl'